﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IceDog.WebServiceClient.WebForm
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ButtonReverse_Click(object sender, EventArgs e)
        {
            var client = new StringServiceReference.StringServiceSoapClient();
            //接收数据
            client.ReverseStringCompleted += (sender2, e2) =>
            {
                if (e2.Error == null)
                {
                    TextBoxResult.Text = e2.Result;
                }
                else
                {
                    TextBoxResult.Text=e2.Error.Message;
                    
                }
            };
            //发送数据
            client.ReverseStringAsync(TextBoxResult.Text);
        }
    }
}